Referring to FIG. 1, keypads and keypad encoders are used in many types of electronic equipment where an operator or user of the equipment gives the equipment instructions, sets the equipment's mode, and/or enters information into the equipment through the use of a keypad. A keypad is typically a small version of a keyboard, typically having 16 to 32 keys, and usually having fewer keys than the 84 to 105 or more keys found on computer keyboards.
In a typical keypad application, the system 50 includes a keypad 52, a keypad encoder 54, a microcontroller 56 or other electronic circuit that receives digitized information from the keypad encoder 54, and a controlled system 60. The keypad encoder 54 is a device that scans the keypad, determines which, if any, keys are depressed, and outputs a digital value that identifies the depressed key.
The controlled system 60 may be a transmitter, a machine on a factory floor, an automated teller machine, or any other electronic equipment utilizing a keypad for user control. In many such applications, the entire system is powered by a battery 62, and thus it is important to minimize energy usage by the entire system 50, and in particular it is important to minimize energy usage while the system is dormant (i.e., inactive but not powered off).
In the prior art, the keypad encoder 54 consumes power even while a system 50 is dormant because it continuously scans the keypad for depressed keys. In fact, 99% of the power used by many keypad encoders is used scanning while no keys are depressed, and only 1% is used for actually identifying depressed keys.
The present invention is an improvement of keypad encoders made by National Semiconductor under the product names MM74C922 and MM74C923. Those keypad encoders continuously scan a keypad for depressed keys. The present invention is similar in many respects to the aforementioned keypad encoders. However, in the present invention the keypad is'scanned only when a key is depressed. Power is saved by (A) disabling the oscillator that drives the keypad's scanning circuitry except when a key has been pressed, and (B) disabling the keypad scanning circuitry except for a very short period of time when a key has been pressed. The disabling of the scanning circuitry is the primary manner in which power is saved.
Another aspect of the present invention is that the scanning circuit is adapted to enable all the keypad columns simultaneously when the circuit is in the dormant mode so as to enable detection of any key press without having to scan the keypad. An enable and reset circuit, coupled to encoder logic, detects new key presses, enables the oscillator and scanning circuits, and turns off the oscillator and scanning circuits after the depressed key has been identified and its identity has been latched in an output latch.
Yet another aspect of the present invention is that the keypad encoder's "scan on demand" circuitry is adapted to allow scanning and encoding of "rolling" key presses, in which a second key is pressed before a previously pressed key is released. While this is not a problem for a continuous scanning encoder, a feature of the present invention is that the scanning of the keypad will be automatically resumed if a second key is pressed before the previously pressed key is released.